package com.health.api.client;


import com.health.api.fallback.MedicineClientFallback;
import com.health.api.model.producer.ProducerRegisterRequest;
import com.health.api.model.transporter.TransporterRegisterRequest;
import com.health.common.model.vo.UserKeyVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author zhexueqi
 * @ClassName ManufacturerClient
 * @since 2024/8/30    16:12
 */
@FeignClient(value = "medicine-service", fallback = MedicineClientFallback.class)
public interface MedicineClient {

    @GetMapping("/medicine/manufacturer/getManufacturerByUserId")
    String getManufacturerByUserId();

    @PostMapping("/medicine/manufacturer/createManufacturerToMysql")
    Boolean createManufacturerToMysql(@RequestBody ProducerRegisterRequest producerRegisterRequest);

    @PostMapping("/medicine/manufacturer/createManufacturer")
    boolean createManufacturer(@RequestBody UserKeyVO userKeyVO,@RequestParam("userAccount") String userAccount );

    @GetMapping("/medicine/transport/getTransportByUserId")
    String getTransportByUserId();

    @PostMapping("/medicine/transport/createTransporterToMysql")
    Boolean createTransporterToMysql(@RequestBody TransporterRegisterRequest transporterRegisterRequest);

    @PostMapping("/medicine/transport/createTransporter")
    void createTransporter(@RequestBody UserKeyVO userKeyVO, @RequestParam("userAccount") String userAccount);


}
